@extends('home.search.layout')
@section('content')

		<div class="list_resulte_banner">
			<div class="list_resulte_left">
				<span class="list_breadcrumb">奇异果为您找到{{$count}}篇文章</span>

				<div class="list_cont">
					<ul>
						@if($archives)
							@foreach($archives as $v)
						<li>
							<a href="{{route('article.show', [$v->id])}}" target="_blank">
								<h2 class="list_cont_title">{!!str_replace($key,"<em>".$key."</em>",$v->title)  !!}</h2>
							</a>
							<div class="list_cont_box">
								@if($v->archive_type_id == 4)
									<img src="{{$v->cover}}" width="106px" height="66px" onerror="$(this).remove()">
								@else
									<img src="{{route('image', [trim($v->cover, '/'), '106x66'])}}" onerror="">
								@endif

								<div class="list_cont_banner">
									@if($v->abstract=='null'||$v->abstract== null)

									@else
									@if (mb_strlen($v->abstract) > 95)
										<p>{{ mb_substr($v->abstract, 0, 95) }}..</p>
									@else
										<p>{{$v->abstract}}</p>
									@endif
									@endif

									<span>
										<a href="{{route('article.show', [$v->id])}}">{{route('article.show', [$v->id])}}</a>
									</span>
								</div>
							</div>
						</li>
						@endforeach
							@endif
					</ul>
				</div>
				<!--分页-->
				<div class="index_page page_center">

						<div class="global_page" >
							{{$archives->links()}}
						</div>

				</div>
                <!--分页-->
			</div>
			<div class="list_resulte_right">
                <div class="list_resulte_tj">
                	<h2>推荐直播</h2>
                </div>
                <div class="list_cont_right">
                	<ul>
						@if(!empty($recommend))
							@foreach($recommend as $v)
                		<li>
							@if($v->tag() && $v->tag()->is_rec)
                					<a href="{{ route('anchor.show', [$v->tag()->id]) }}" target="_blank">
							@else
									<a href="{{ route('anchor.preview',[$v->id]) }}" target="_blank">
							@endif
                			    <div class="list_pic_box">
                			    	<div class="list_pic">
                			    		<img src="{{$v->cover}}" style="width:266px;height:146px">
                			    	</div>
                			    	<div class="list_pic_cont">
                			    		<span class="list_pic_cont_userpic"><img src="{{$v->avatar}}" height="45px" width="45px"></span>
                			    		<h2>{{$v->name}}</h2>
                			    		<p>
                			    		<span class="list_name">
											@if (mb_strlen($v->room_name) > 7)
												{{ mb_substr($v->room_name, 0, 7) }}..
											@else
												{{$v->room_name}}
											@endif</span>
                			    		<span class="list_fs">{{ num2word($v->online) }}在线</span>
                			    		</p>
                			    	</div>
                			    </div>
                		    </a>
                		</li>
                		@endforeach
							@endif
                	
                	</ul>
                </div>
			</div>
		</div>


		<script>
			$(function(){
			    $('.list_box').removeClass('list_box2');
			    $('.list_foot').removeClass('foot_banner');
			})
		</script>
@endsection